myApp.onPageInit('saIndex', function(page) {
	var today = new Date();
	var weekLater = new Date().setDate(today.getDate() + 7);
	var monthNames = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
	var dayNameArr = ['日','一','二','三','四','五','六'];
	var dayNameShortArr = ['日','一','二','三','四','五','六'];
	var calendarInline = myApp.calendar({
		container: '#ks-calendar-inline-container-sa',
		value: [new Date()],
		dateFormat : 'yyyy-mm-dd',
		dayNames:dayNameArr,
		dayNamesShort:dayNameShortArr,
		//weekHeader: false,
		rangePicker: false,
		cssClass: 'sa-calendar',
		toolbarTemplate: '',
		onOpen: function(p) {
			$$('.calendar-custom-toolbar .center').text(p.currentYear+ '年 ' + monthNames[p.currentMonth] + '月');
			$$('.calendar-custom-toolbar .left .link').on('click', function() {
				calendarInline.prevMonth();
			});
			$$('.calendar-custom-toolbar .right .link').on('click', function() {
				calendarInline.nextMonth();
			});
		},
		onMonthYearChangeStart: function(p) {
			$$('.calendar-custom-toolbar .center').text(p.currentYear+ '年 ' + monthNames[p.currentMonth] + '月');
		}
	});

	$$('.ks-color-theme-bold').on('click', function(e) {
		var isCheck = $$(this).prop('isChecked');
		if (isCheck && isCheck == '1') {
			$$(this).removeClass('bg-green').children().removeClass("p-center-bold-white").addClass("p-center-bold");//p-center-bold
			$$(this).prop('isChecked', '0');
		} else {
			$$(this).addClass('bg-green').children().removeClass("p-center-bold").addClass("p-center-bold-white");
			$$(this).prop('isChecked', '1');
		}
	});
});